home *** CD-ROM | disk | FTP | other *** search
- #define SOUND_STOPPED 0 // no sound is playing
- #define SOUND_PLAYING 1 // a sound is playing
-
- // return values for the midi sequence status function
-
- #define SEQUENCE_STOPPED 0 // the current sequence is stopped
- #define SEQUENCE_PLAYING 1 // the current sequence is playing
- #define SEQUENCE_COMPLETE 2 // the current sequence has completed
- #define SEQUENCE_UNAVAILABLE 0 // this sequence is unavailable
-
- // these return values are used to determine what happened when a midi file
- // has been registered
-
- #define XMIDI_UNREGISTERED 0 // the midi file couldn't be registered at all
- #define XMIDI_BUFFERED 1 // the midi file was registered and buffered
- #define XMIDI_UNBUFFERED 2 // the midi file was registered, but was too
- // big to be buffered, hence, the caller
- // needs to keep the midi data resident
- // in memory
-
- extern int DigPakLoaded;
- extern int DigPakInit;
- extern unsigned char far *DigPakAddr;
- extern unsigned int DigPakParaSeg;
- extern int MidPakLoaded;
- extern int MidPakInit;
- extern unsigned char far *MidPakAddr;
- extern unsigned int MidPakParaSeg;
- extern unsigned char far *AdvAddr;
- extern unsigned int AdvParaSeg;
- extern unsigned char far *AdAddr;
-
-
- // the DIGPAK sound structure
-
- typedef struct SNDSTRUC_typ
- {
- unsigned char far *sound; // a pointer to the raw sound data
- unsigned short sndlen; // the length of the sound data in bytes
- short far *IsPlaying; // a pointer to a variable that will be
- // used to hold the status of a playing
- // sound
- short frequency; // the frequency in hertz that the
- // sound should be played at
- } SNDSTRUC, *SNDSTRUC_PTR;
-
- // our high level sound structure
-
- typedef struct sound_typ
- {
- unsigned char far *buffer; // pointer to the start of VOC file
- short status; // the current status of the sound
- SNDSTRUC SS; // the DIGPAK sound structure
- } sound, *sound_ptr;
-
- // this holds a midi file
-
- typedef struct music_typ
- {
- unsigned char far *buffer; // a pointer to midi data
- long size; // size of midi file in bytes
- int status; // status of song
- int register_info; // return value of RegisterXmidiFile
- } music, *music_ptr;
-
- int Sound_Load(char *filename, sound_ptr the_sound, int translate);
-
- void Sound_Translate(sound_ptr the_sound);
-
- void Sound_Unload(sound_ptr the_sound);
-
- void Sound_Play(sound_ptr the_sound);
-
- int Sound_Status(void);
-
- void Sound_Stop(void);
-
- int Music_Load(char *filename, music_ptr the_music);
-
- int Music_Register(music_ptr the_music);
-
- void Music_Unload(music_ptr the_music);
-
- int Music_Play(music_ptr the_music, int sequence);
-
- void Music_Stop(void);
-
- void Music_Resume(void);
-
- int Music_Status(void);
-
- int Load_Sound_Driver_File(char *Filename, unsigned char far *(*Addr), unsigned int *Para, long *Len);
-
- int Load_DigPak(char *Filename);
-
- int Init_DigPak(void);
-
- int DeInit_DigPak(void);
-
- void UnLoad_DigPak(void);
-
- void Unload_DigPak(void);
-
- int Load_MidPak(char *Filename, char *AdvFilename, char *AdFilename);
-
- int Init_MidPak(void);
-
- void DeInit_Midpak(void);
-
- void UnLoad_MidPak(void);
-